<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="${staticServer}/css/t/main.css" />
<link rel="stylesheet" href="${staticServer}/css/t/page.css" />
<link rel="stylesheet" href="${staticServer}/css/t/ask.css" />
<script src="${staticServer}/js/t/jquery.js"></script>
<script src="${staticServer}/js/t/pageset.js"></script>
<script src="${staticServer}/js/t/htmlfilter.js"></script>
<script src="${staticServer}/js/t/tips.js"></script>
<script src="${staticServer}/js/t/ask_add.js?1.3"></script>
<script>
</script>
</head>

<body>
<input type="hidden" id="askId" value="<#if ask??>${ask.id}</#if>" />
	<div id="home_link">
		<ul>
			<li></li>
			<li>&gt;</li>
			<li>问卷</li>
			<li>&gt;</li>
			<li class="current"><?php echo $title?></li>
		</ul>
	</div>
	<div id="caption">
		<ul>
			<li><span class="title">操作提示：</span></li>
			<li><span class="quote">Ctrl+Enter</span> 提交保存</li>
		</ul>
	</div>
	<div id="container">
		<div id="title"></div>
		<table id="tbl_article">
			<tr>
				<th width="25%">名称
					<p class="caption">字数限制在 30 个汉字以内</p>
				</th>
				<td width="75%"><input type="text" value="<#if ask??>${ask.topic}</#if>" id="topic" size="50" /></td>
			</tr>
			<tr>
				<th>描述</th>
				<td><div id="desc" contenteditable="true"><#if ask??>${ask.descs}</#if></div>
					<p class="line"></p>
					<p class="caption">
						对于该调查问卷的开头描述（支持HTML）（选中文本，<span class="quote">Ctrl+B</span> 加粗 <span class="quote">Ctrl+U</span> 下划线 <span
							class="quote">Ctrl+I</span> 斜体）
					</p></td>
			</tr>
			<tr>
				<th>选项<a id="btnAddItemGroup" class="add" title="点击添加新的问卷选项组"></a></th>
				<td id="items"><span class="caption">请点击左侧“+”添加选项组。</span>
				<#if askIList??>
					<#list askIList as list>
					<div id="${list.id}" class="item_group" style="background-image: url(../resource/img/t/num-1.png);"><p><label>分组名称：</label>
					<input type="text" value="${list.topic}" name="topic" size="50">
					<a rel="btnDelItemGroup" class="del" title="点击删除该选项组"></a><a rel="btnAddItem" class="add" title="点击添加新的选项"></a><a rel="btnItemShow" class="search" title="显示/隐藏选项列表"></a><a rel="btnItemExpand" class="arrow" title="展开此选项组并收起其它组"></a><a rel="btnItemUp" class="arrow-up" title="向上"></a><a rel="btnItemDown" class="arrow-down" title="向下"></a></p>
					<#list list.itemList as list>
					<ul style="display: none;">
						<li style="list-style:decimal inside;">
						<input type="text" value="${list.q}" name="question" size="50"><span></span>
						<label>选项：</label>
						<input type="text" value="${list.i}" name="items" size="30"><a rel="btnDelItem" class="del" title="点击删除该选项"></a></li>
					</ul>
					</#list>
					</div>
					</#list>
				</#if>
					
					<p class="line"></p>
					<p class="caption">选项的填写格式为“选项名称:分数”，用“冒号”（英文）分隔，多个选项之间用“逗号”分隔</p></td>
			</tr>
			<tr>
				<th>答案评分<a id="btnAddScoreGroup" class="add" title="点击添加新的评分组"></a></th>
				<td id="scores"><span class="caption">请先添加选项组。</span>
				
				<#if askSList??>
					<#list askSList as list>
					<div id="${list.id}" rel="${list.id}" class="score_group" style="background-image:url(../resource/img/num-1.png);">
					<p><label>分组名称：</label>
					<input type="text" value="${list.topic}" name="group_name" size="50">
					<a rel="btnDelScoreGroup" class="del" title="点击删除该评分规则"></a><a rel="btnAddScore" class="add" title="点击添加新的评分规则"></a><a rel="btnScoreShow" class="search" title="显示/隐藏评分规则列表"></a><a rel="btnScoreExpand" class="arrow" title="展开此规则组并收起其它组"></a><a rel="btnScoreUp" class="arrow-up" title="向上"></a><a rel="btnScoreDown" class="arrow-down" title="向下"></a></p><p>
					
					
					<label>分数来源：</label><span rel="score_source"></span>
					<span class="rect quote" style="margin-right:2px;" rel="h4l1o400t4q5">
					<span>${list.topic}</span><a rel="btnDel" class="del" title="点击删除该来源"></a></span>
					<a rel="btnAddSource" class="add" title="点击添加新来源"></a></p>
					
					<#list list.scoresList as list>
					<ul style="display:none">
						<li style="list-style:decimal inside;">
						<label>分数为<input type="text" value="${list.s1}" name="score_1" size="3">至<input type="text" value="${list.s2}" name="score_2" size="3">分时，结果为：</label>
						<a rel="btnStress" class="red" title="用红色文本强调突出内容">[ 强调 ]</a>
						<a rel="btnDelItem" class="del" title="点击删除该评分规则"></a><br>
						<div rel="result" class="rect" contenteditable="true">${list.r}</div>
						</li>
					</ul>
					</#list>
					
					</div>
					</#list>
				</#if>
					<p class="line"></p>
					<p class="caption">可添加多个评分规则，当前后分数相同时代表等值判定，不同时代表分数区间判定。</p></td>
			</tr>
		</table>
		<div class="remark">
			<ul>
				<li><span class="title">注意事项：</span></li>
				<li>1、填写选项时，中文的“逗号、冒号”将自动转换为英文符号</li>
				<li>2、分数填写相同时，代表“等于”。不同时代表“区间”且包含前后值。只填前者代表“小于等于”该值。只填后者代表“大于等于”该值。</li>
			</ul>
		</div>
		<div id="controlbar">
			<input id="btnSubmit" type="button" class="submit" value="  提交保存问卷  " />
			<input id="btnCancel" type="button" class="submit" value="  返回列表  " onclick="history.back()" />
		</div>
	</div>
</body>
</html>

